package com.lepu.app.fun.lottery.bean;

import org.json.JSONException;
import org.json.JSONObject;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

public class LotteryDetailBean {

	public String RaffleID;//	活动ID
	public String RaffleTitle;//	活动名称
	public String RaffleContent;//	活动详情
	public String BeginTime;//	活动开始时间
	public String EndTime;//	活动截止时间
	public String DrawTime;//	开奖时间
	public String AttendeeNum;//	当前参与人数
	public String Status;//	用户参与状态

	public String Cover;//
	public String ArticleTitle;//
	public String ArticleDescription;//
	
	public static LotteryDetailBean parseJsonData(String dataString)
	{
		String result = "";
		try {
			JSONObject jsonObject = new JSONObject(dataString);
			JSONObject obj1 = (JSONObject) jsonObject.get("Result");
			JSONObject obj2 = (JSONObject) obj1.get("DetailInfo");
			
			result = obj2.toString();
		} catch (JSONException e) {
			e.printStackTrace();
		}
		
		Gson gson = new Gson();
		LotteryDetailBean item = gson.fromJson(result,new TypeToken<LotteryDetailBean>() {}.getType());
		return item;
	}

}
